package com.bawei.property.model

import com.bawei.common.model.BaseRepository
import com.bawei.network.HttpInterceptorType
import com.bawei.property.api.PropertyApiServer
import com.bawei.property.entity.CarColorResultEntity
import com.bawei.property.entity.ParkListResultEntity
import com.bawei.property.entity.UploadImgResultEntity
import okhttp3.MultipartBody
import javax.inject.Inject

/**
 * Author: Jason Zhang
 * Date: 2024/8/28
 * Desc: 车位申请数据仓库
 */
class ParkApplyRepository @Inject constructor(private val apiServer: PropertyApiServer): BaseRepository<PropertyApiServer>(){

    suspend fun getParkApplyList(): ParkListResultEntity = apiServer.getParkingList()
    suspend fun getCarColorList(): CarColorResultEntity = apiServer.getColorList()
    suspend fun uploadCarImages(list: MutableList<MultipartBody.Part>): UploadImgResultEntity = createApiServer(PropertyApiServer::class.java, HttpInterceptorType.UPLOAD).uploadCarImages(list)





}